<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport"
    content="width=device-width, initial-scale=1, maximum-scale=1,minimum-scale=1, user-scalable=no" />
  <title>利用bfc实现实现两侧固定中间自适应</title>
  <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
</head>
<style>
  .father {
    height: 500px;
    background-color: pink;
  }

  .left {
    float: left;
    width: 200px;
    height: 400px;
    background-color: blue;
  }

  .right {
    float: right;
    width: 200px;
    height: 400px;
    background-color: blue;
  }

  .center {
    height: 450px;
    background-color: green;
    overflow: hidden;
  }
</style>

<body>
  <div class="father">
    <div class="left"></div>
    <div class="right"></div>
    <div class="center"></div>
  </div>
</body>

</html>